<template>
  <div class="wrap">
    <router-view></router-view>
  </div>
</template>
<script type="text/ecmascript-6">
import {getopenid} from 'common/js/wxconfig';
export default {
  props: {
  },
  created() {
//    window.localStorage.opt_id = 'oFFE-0mB7IEcHonpLy5OVfaUw8gM';
    let url = 'http://askh5.lightway.cc?';
    if (this.$route.query.exam_id !== 'undefined' && this.$route.query.exam_id) {
      url = url + 'exam_id=' + this.$route.query.exam_id;
    } else {
      url = url + 'exam_id=' + 2;
    }
    if (this.$route.query.source !== 'undefined' && this.$route.query.source) {
      url = url + '&source=' + this.$route.query.source;
    }

    if (this.$route.query.spread_level !== 'undefined' && this.$route.query.spread_level) {
      url = url + '&spread_level=' + this.$route.query.spread_level;
    }
    getopenid(this, url, 'wx8fe2a003c0b6b26f');
  }
};
</script>
<style lang="stylus" rel="stylesheet/stylus">
.wrap
  position absolute
  min-height 100%;
  width 100%
  text-align center
  overflow hidden
  background-color #F3CB19
  z-index: -1
  &:before
    position absolute
    display block
    top 0
    content:"";
    width 100%
    background url("./common/imgs/diwenup.png")
    background-size 100% 100%
    height 75px
    z-index -1
  &:after
    position absolute
    display block
    bottom 0
    content:"";
    width 100%
    background url("./common/imgs/diwendown.png") no-repeat;
    background-size 100% 100%
    height 70px;
    z-index: -1
</style>
